<template>
  <div class="app-container">
    <div class="layout-content">
      <div class="user_content" @click="userClick">
        <van-image round width="80px" height="80px" :src="userInfo.avatar" />
        <div class="user_data">
          <h5>
            <span>{{ userInfo.realname }}</span>
          </h5>
          <p>
            <span>{{ userInfo.post }}</span>
          </p>
        </div>
        <div class="user_operate">
          <van-icon name="arrow" />
        </div>
      </div>
    </div>
    <div class="operate_content">
      <van-cell title="提醒设置" is-link to="/remind" />
    </div>
    <div class="layout-footer">
      <TabBar :activeTab="4"></TabBar>
    </div>
  </div>
</template>

<script>
import TabBar from "@/components/TabBar";
export default {
  data() {
    return {
      userInfo: {},
    };
  },
  created() {
    this.userInfo = this.$store.getters.userInfo;
    console.log(this.$store.getters.userInfo);
  },
  methods: {
    userClick() {
      console.log(111);
      this.$router.push({ path: "/mineUser" });
    },
  },
  components: {
    TabBar,
  },
};
</script>

<style lang="scss" scoped>
.app-container {
  background-color: #f5f5f5;
  height: 100%;
  .layout-content {
    width: 100%;
    background-color: #fff;
    .user_content {
      display: flex;
      align-items: center;
      padding: 20px;
      .user_data {
        flex: 1;
        margin-left: 15px;
        h5 {
          margin: 0;
          line-height: 32px;
          span {
            font-size: 16px;
            font-weight: 400;
          }
        }
        p {
          margin: 0;
          line-height: 28px;
          span {
            font-size: 14px;
          }
        }
      }
      .user_operate {
        .van-icon {
          font-size: 16px;
          color: #ccc;
        }
      }
    }
  }
  .operate_content {
    margin-top: 40px;
  }
}
</style>
